package com.yanqu.road.server.cmd.activity;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.union.UnionProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.server.protocol.ChannelProtocol;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_CHANNEL_QUERY_UNION_REQ_BACK, desc = "跨域查看商会")
public class ChannelQueryUnionCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        UnionProto.CrossUnionQueryFromServerRespMsg reqMsg = UnionProto.CrossUnionQueryFromServerRespMsg.parseFrom(packet.getBytes());
        GamePlayerMgr.sendChannelPlayerPacket(ChannelProtocol.N_CHANNEL_QUERY_UNION_RESP, reqMsg.toBuilder(),packet.getPlayerId());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
